package com.uade.empresasdistribuidas.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.uade.empresasdistribuidas.connection.HibernateUtil;

public class HibernateInterceptor extends AbstractInterceptor {

	/**
	 * 
	 */
	private static final long serialVersionUID = 9099213602903259085L;

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		String result=invocation.invoke();
		HibernateUtil.finalizeSession();
		return result;
	}

}
